package com.xd.util;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class Response {
    @JsonProperty(value = "Response")
    private ResponseInfo response;
    @Data
    public static class ResponseInfo{
        @JsonProperty(value = "ResponseURL")
        private String responseURL;
        @JsonProperty(value = "CreatedID")
        private Integer createdID;
        @JsonProperty(value = "ResponseCode")
        private int responseCode;
        @JsonProperty(value = "SubResponseCode")
        private int subResponseCode;
        @JsonProperty(value = "ResponseString")
        private String responseString;
        @JsonProperty(value = "StatusCode")
        private int statusCode;
        @JsonProperty(value = "StatusString")
        private String statusString;
        @JsonProperty(value = "Data")
        private Object data;

        public <T> T getData(){
            return (T) data;
        }
    }
}
